package 方法重写;

public class Animal {
    //名字，年龄，种类
     String name;
     int age;
     String sex;
    //吃，睡，职责
    public void eat(){}
    public void duty(){}
    public void sleep(){
        System.out.println(name+"会睡觉");
    }


}
